<script setup>
import { ref, reactive, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import router from '@/router'
import {} from '@/api/data'
import 'echarts/lib/component/dataZoom'
import 'echarts/lib/component/legend'
import { getWeekTime, getMW } from '@/utils'
// 定义loading
const isLoading = ref(false)
const bannerFlag = ref(true) //banner 标志
const images = ref([
  'https://img.yzcdn.cn/vant/apple-1.jpg',
  'https://img.yzcdn.cn/vant/apple-2.jpg',
  'https://img.yzcdn.cn/vant/apple-3.jpg',
  'https://img.yzcdn.cn/vant/apple-4.jpg'
])
console.log(images.value)

// 跳转防伪
const toSecurity = async () => {
  console.log(111)
  router.push(`/Security`)
}
// 查看更多
const tocompany = async () => {
  console.log(22)
  router.push(`/Company`)
}
</script>

<template>
  <div class="swiper-box" v-if="bannerFlag">
    <van-swipe :autoplay="3000" :height="240">
      <van-swipe-item v-for="(image, index) in images" :key="index">
        <img :src="image" style="width: 100%; height: 100%" />
      </van-swipe-item>
    </van-swipe>
  </div>
  <div class="menu-list">
    <van-grid :column-num="3" border>
      <van-grid-item>
        <ul class="flex-align">
          <van-icon name="photo" :size="60" />
          <div class="">
            <li class="" style="text-align: center" @click="tocompany">企业简介</li>
          </div>
        </ul>
      </van-grid-item>
    </van-grid>
  </div>
</template>

<style scoped>
.menu-list {
  margin-top: 30px;
}
</style>